#include "kmeans.h"

int main(int argn, char** argv){

 Kmeans* kmeans = new Kmeans;

   // GNU message
   cout <<	
     "----------------------------------------------------------------\n"
     "KMEANS - k-means clustering \n"
     "----------------------------------------------------------------\n"
     "Copyright (C) 2000  Marcelo Barros de Almeida\n"
     "                    barros@cpdee.ufmg.br\n"
     "                    http://litc.cpdee.ufmg.br/~barros/svm/smobr/\n"
     "                    Bernardo Penna Resende de Carvalho          \n"      
     "                    bpenna@cpdee.ufmg.br                        \n"  
     "                    http://www.cpdee.ufmg.br/~bpenna            \n"
     "----------------------------------------------------------------\n\n"					
     "This program is free software; you can redistribute it and/or modify\n"
     "it under the terms of the GNU General Public License as published by\n"
     "the Free Software Foundation; either version 2 of the License, or\n"
     "(at your option) any later version.\n\n"
     "This program is distributed in the hope that it will be useful,\n"
     "but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
     "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n"			
     "GNU General Public License for more details.\n\n";	
     // load file

     if(!kmeans->loadParams(argn,argv))
		 exit(1);

	 // training
	 kmeans->findClusters();
	   
	 kmeans->saveResult();

     kmeans->saveDetail();

     // print report
     kmeans->printSummary();

     delete kmeans;
	 
	 return TRUE;

}

